<html>
<head>

	<link rel="stylesheet" href="theme/ui-darkness/jquery-ui-1.7.2.custom.css" type="text/css" />	
	<link rel="stylesheet" href="css/core.css" type="text/css" />	
	
	<link rel="stylesheet" href="css/debug.css" type="text/css" />

	<script src="lib/jquery.js"></script>
	<script src="lib/jquery-ui.min.js"></script>
	<script src="lib/jquery.template.js"></script>
	<script src="lib/json2.js"></script>
	<script src="lib/Math.uuid.js"></script>

	<script src="js/ControlPanel.js"></script>
	<script src="js/Canvas.js"></script>
	<script src="js/CanvasObject.js"></script>
	<script src="js/LayoutDocument.js"></script>
	<script src="js/layout.js"></script>
	<script src="js/debug.js"></script>
	<script src="js/saveload.js"></script>

	<script>
	
		function evalConsoleLine( line ) {
			var tokens = line.split(" ");
			var cmd = tokens[0];
			
			if (cmd == "clear" || cmd == "c") {
				cprint("clear console");
				$("#console_output").empty();
			} else if (cmd == "e" || cmd == "eval") {
  				cprint("Eval: " + tokens[1]);
  				eval(tokens[1] + ";");
  			} else if (cmd == "d" || cmd == "debug") {
  				if (tokens[1] == "canvas") {
  					Canvas.debug = !Canvas.debug;
  				} else if (tokens[1] == "canvasobject") {
  					CanvasObject.debug = !CanvasObject.debug;
  				}
  			}
  			
		}
	
		$(function() {
		
			if (window.location.hash == "#console") {
				initDebug("#debug");
			} else {
				initApp();
			}

		});
		
		function initApp() {
			initLayoutDocument();
			initControlPanel();
			initCanvas();
			theControlPanel().fullRefresh();
			theControlPanel().updateNavMap();
			positionGUIElements();
			
			$(document).keydown(function(e) {
				if (e.keyCode == 46) {
				
				}
			});
		}
	
	</script>
	
	<style id="style_cssClasses"></style>
	
</head>

<body>

	<div id="container">
		
		<div id="debug"></div>
	
		<div id="control_panel_container" class="control_panel_container" title="Inspector">
			<!--<div class="panel_header">Inspector</div>-->
		</div>
		<div id="canvas_container" class="canvas_container" title="Canvas">
			<!--<div class="panel_header">Canvas</div>-->
		</div>

	</div>

</body>
</html>